package com.kbt.activity;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.os.Bundle;
import android.os.StrictMode;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.widget.*;
import com.android.volley.Request;
import com.google.gson.Gson;
import com.kbt.base.BaseApplication;
import com.kbt.commont.Constants;
import com.kbt.model.data.BaseBean;
import com.kbt.model.data.RenZhengBean;
import com.kbt.net.RequestManager;
import com.kbt.util.tool.TimeCountUtil;
import com.kbt.util.tool.UUIDUtilTool;
import com.kbt.util.utils.SharePreferenceUtils;
import com.kbt.util.utils.Utils;

import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;

/**
 * @Title: KBT_ANDRIOD
 * @Copyright: KJ Co., Ltd. Copyright 2015-2020,  All rights reserved
 * @Description: ${todo}完成实名认证
 * @author: zhgk
 * @data: 2015/8/17 15:45
 * @version: V1.0
 */
public class OverRenZhengActivity extends Activity {

    private EditText phone_number;
    private EditText userName;
    private EditText tixian_type;
    private EditText tixian_zhanghao;
    private EditText yaoQingCode;
    private LinearLayout linearLayoutYaoQingMa;
    private RenZhengBean renzhengBean;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
        setContentView(R.layout.user_over_renzheng);
        this.getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.title_return_btn);
        //设置返回按钮事件,关闭当前Activity，返回数据
        ImageView returnImg = (ImageView) findViewById(R.id.return_btn);
        returnImg.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //不创建地址
                setResult(RESULT_CANCELED, null);
                BaseApplication.getInstance().removeActivity(OverRenZhengActivity.this);
                finish();
            }
        });

        TextView appTitleView = (TextView) findViewById(R.id.center_title);
        appTitleView.setText("绑定提现账号");
        init();
    }

    @Override
    protected void onStart() {
        super.onStart();
    }
    //初始化
    public void init(){
        Intent intent = this.getIntent();
        renzhengBean=(RenZhengBean)intent.getSerializableExtra("renzhengBean");
        linearLayoutYaoQingMa = (LinearLayout) findViewById(R.id.linearLayoutYaoQingMa);
        phone_number = (EditText) findViewById(R.id.phone_number);
        phone_number.setText(renzhengBean.getUser_mobile());
        userName = (EditText) findViewById(R.id.userName);
        userName.setText(renzhengBean.getUser_name());
        tixian_type = (EditText) findViewById(R.id.tixian_type);
        if(renzhengBean.getUser_ac_type().equals("1")){
            tixian_type.setText("支付宝");
        }else{
            tixian_type.setText("微信");
        }
        yaoQingCode = (EditText) findViewById(R.id.yaoQingCode);
        tixian_zhanghao = (EditText) findViewById(R.id.tixian_zhanghao);
        tixian_zhanghao.setText(renzhengBean.getUser_ac_account());
    }
}
